package main

import "fmt"

func Fibonacci() adders {
	x, y := 0, 1
	return func() int {
		x, y = y, x+y
		return x
	}
}

type adders func() int

func main() {
	var i = 10
	s := Fibonacci()
	for j := 0; j <= i; j++ {
		fmt.Printf("0 + 1 + 2 + ... + %v = %v\n", j, s())
	}
	fmt.Println()
}
